
import http from '@/util/request'

// 通知回执-模板相关操作 增，删，改，查开启
export default {
  list: {
    url: `${process.env.VUE_APP_API_URL}/SmartEvaluate/plan/getPlanPage.json`,
    name: '获取计划列表',
    get: async function (params) {
      const dataObj = await http.get(this.url, params)
      return dataObj
    }
  },
  add: {
    url: `${process.env.VUE_APP_API_URL}/SmartEvaluate/plan/saveOrUpdatePlan.json`,
    name: '新增或修改计划',
    post: async function (params) {
      const dataObj = await http.post(this.url, params)
      return dataObj
    }
  },
  previewList: {
    url: `${process.env.VUE_APP_API_URL}/SmartEvaluate/plan/getEvaluatorEvaluatedList.json`,
    name: '第二步获取模板列表',
    get: async function (params) {
      const dataObj = await http.post(this.url, params)
      return dataObj
    }
  },
  labelList: {
    url: `${process.env.VUE_APP_API_URL}/SmartEvaluate/plan/getPlanLabelModelList.json`,
    name: '第3步获取模板列表',
    get: async function (params) {
      const dataObj = await http.get(this.url, params)
      return dataObj
    }
  },
  relation: {
    url: `${process.env.VUE_APP_API_URL}/SmartEvaluate/plan/savePlanLabelModel.json`,
    name: '保存标签和模版关系',
    post: async function (params) {
      const dataObj = await http.post(this.url, params)
      return dataObj
    }
  },
  detail: {
    url: `${process.env.VUE_APP_API_URL}/SmartEvaluate/plan/getPlanInfo.json`,
    name: '获取计划详情',
    get: async function (params) {
      const dataObj = await http.get(this.url, params)
      return dataObj
    }
  },
  publish: {
    url: `${process.env.VUE_APP_API_URL}/SmartEvaluate/plan/publishPlan.json`,
    name: '计划-发布',
    post: async function (data) {
      const dataObj = await http.post(this.url, data)
      return dataObj
    }
  },
  remind: {
    url: `${process.env.VUE_APP_API_URL}/SmartEvaluate/plan/remind.json`,
    name: '计划-提醒',
    post: async function (data) {
      const dataObj = await http.post(this.url, data)
      return dataObj
    }
  },
  stop: {
    url: `${process.env.VUE_APP_API_URL}/SmartEvaluate/plan/stopPlan.json`,
    name: '计划-停止',
    post: async function (data) {
      const dataObj = await http.post(this.url, data)
      return dataObj
    }
  },
  del: {
    url: `${process.env.VUE_APP_API_URL}/SmartEvaluate/plan/delPlan.json`,
    name: '计划-删除',
    post: async function (data) {
      const dataObj = await http.post(this.url, data)
      return dataObj
    }
  },
  downfile: {
    url: `${process.env.VUE_APP_API_URL}/SmartEvaluate/plan/downloadEvaluateTemplate.json`,
    name: '创建计划-下载评价明细表',
    get: async function (data, okFun) {
      const dataObj = await http.down(this.url, data, {}, okFun)
      return dataObj
    }
  },
  downSList: {
    url: `${process.env.VUE_APP_API_URL}/SmartEvaluate/plan/downloadCompletionEvaluatedList.json`,
    name: '计划统计-统计-下载评价对象统计表',
    get: async function (data, okFun) {
      const dataObj = await http.down(this.url, data, {}, okFun)
      return dataObj
    }
  },
  getAllClass: {
    url: `${process.env.VUE_APP_API_URL}/esb/api/grade/getGradesAndClas`,
    name: '获取所有的年级班级',
    get: async function (data) {
      const dataObj = await http.get(this.url, data)
      return dataObj
    }
  },
  getGradeClass: {
    url: `${process.env.VUE_APP_API_URL}/esb/api/class/getClassesOfGrade`,
    name: '获取年级下的班级',
    get: async function (data) {
      const dataObj = await http.get(this.url, data)
      return dataObj
    }
  },
  evaluaters: {
    url: `${process.env.VUE_APP_API_URL}/SmartEvaluate/plan/getCompletionEvaluatorList.json`,
    name: '计划统计-评价人列表',
    get: async function (data) {
      const dataObj = await http.get(this.url, data)
      return dataObj
    }
  },
  addEvaluaters: {
    url: `${process.env.VUE_APP_API_URL}/SmartEvaluate/plan/saveEvaluatorEvaluated.json`,
    name: '计划统计-评价人列表--新增评价人',
    post: async function (data) {
      const dataObj = await http.post(this.url, data)
      return dataObj
    }
  },
  evaluateders: {
    url: `${process.env.VUE_APP_API_URL}/SmartEvaluate/plan/getCompletionEvaluatedList.json`,
    name: '计划统计-被评价人列表',
    get: async function (data) {
      const dataObj = await http.get(this.url, data)
      return dataObj
    }
  },
  delEvaluator: {
    url: `${process.env.VUE_APP_API_URL}/SmartEvaluate/plan/delEvaluatorEvaluated.json`,
    name: '计划统计-评价人列表--删除',
    post: async function (data) {
      const dataObj = await http.post(this.url, data)
      return dataObj
    }
  },
  evaluatedersDeail: {
    url: `${process.env.VUE_APP_API_URL}/SmartEvaluate/question/getQaReportList`,
    name: '计划统计-被评价人列表',
    get: async function (data) {
      const dataObj = await http.get(this.url, data)
      return dataObj
    }
  },
  submitterList: {
    url: `${process.env.VUE_APP_API_URL}/SmartEvaluate/question/getOptionReportList`,
    name: '计划统计-被评价人列表--答题明细-提交人列表',
    get: async function (data) {
      const dataObj = await http.get(this.url, data)
      return dataObj
    }
  },
  refresh: {
    url: `${process.env.VUE_APP_API_URL}/SmartEvaluate/question/doEvaluatedStatus`,
    name: '刷新',
    get: async function (data) {
      const dataObj = await http.get(this.url, data)
      return dataObj
    }
  },
  seachOption: {
    url: `${process.env.VUE_APP_API_URL}/SmartEvaluate/plan/getEvaluatorSearchSelect.json`,
    name: '计划统计-查询评价人下拉列表',
    get: async function (data) {
      const dataObj = await http.get(this.url, data)
      return dataObj
    }
  },
  seachRightOption: {
    url: `${process.env.VUE_APP_API_URL}/SmartEvaluate/plan/getEvaluatedSearchSelect.json`,
    name: '计划统计-查询被评价人下拉列表',
    get: async function (data) {
      const dataObj = await http.get(this.url, data)
      return dataObj
    }
  },
  // 填写状态明细
  seachStatus: {
    url: `${process.env.VUE_APP_API_URL}/SmartEvaluate/plan/getEvaluatedListByEvaluatorUserId.json`,
    name: '计划统计-完成明细表-单条的统计详情',
    get: async function (data) {
      const dataObj = await http.get(this.url, data)
      return dataObj
    }
  },
  getAllChangedIds: {
    url: `${process.env.VUE_APP_API_URL}/SmartEvaluate/plan/getSelectEvaluatorList.json`,
    name: '计划统计-查询所有的评价人IDS-判断是否重复',
    get: async function (data) {
      const dataObj = await http.get(this.url, data)
      return dataObj
    }
  }
}
